package com.itheima;

import com.itheima.dao.BookDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


/**
 * 集合的注入
 * 也是用setter注入方式
 */
public class AppForDiCollection {

    public static void main(String[] args) {
        ApplicationContext cx = new ClassPathXmlApplicationContext("applicationContext.xml");

        BookDao bookDao = (BookDao) cx.getBean("bookDao");

        bookDao.save();
    }
}
